#define WIDTH 400
#define HEIGHT 400

#include "cairo-tutorial-gtk.h"
#include "handwriting.h"

static void
draw(cairo_t *cr, int width, int height)
{
	/*
	 * our draw functions, draw 4 lines with gradient width
	 */
	draw_line (cr, 300, 100, 40, 300, 150, 30);
	draw_line (cr, 300, 150, 30, 300, 200, 20);
	draw_line (cr, 300, 200, 20, 300, 250, 10);
	draw_line (cr, 300, 250, 10, 300, 300, 0);

	/*
	 * cairo's default draw functions
	 */
	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
	cairo_move_to (cr, 100, 100);

	cairo_set_line_width (cr, (40+30)/2);
	cairo_move_to (cr, 100, 100);
	cairo_line_to (cr, 100, 150);
	cairo_stroke (cr);

	cairo_set_line_width (cr, (30+20)/2);
	cairo_move_to (cr, 100, 150);
	cairo_line_to (cr, 100, 200);
	cairo_stroke (cr);

	cairo_set_line_width (cr, (20+10)/2);
	cairo_move_to (cr, 100, 200);
	cairo_line_to (cr, 100, 250);
	cairo_stroke (cr);

	cairo_set_line_width (cr, (10+0)/2);
	cairo_move_to (cr, 100, 250);
	cairo_line_to (cr, 100, 300);
	cairo_stroke (cr);
}
